RDKEMW-11440 : [RDKE][Xumo]"btMgrBus" process crash is observed#44
RDKEMW-11440 : [RDKE][Xumo]"btMgrBus" process crash is observed#44tharun-kumarv wants to merge 4 commits intodevelopfrom
Conversation
Reason for change: dbus crash due to invalid path. Test Procedure: Check Ticket Description. Risks: Low Priority: P1
Reason for change: dbus crash due to invalid path. Test Procedure: Check description Risks: Low Priority: P1
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent btMgrBus crashes caused by passing an invalid D-Bus object path into BlueZ/libdbus calls by adding object-path validation before issuing a GetAll properties method call.
Changes:
- Updates and relocates
btrCore_IsPathValid(now takesconst char*) and adds NULL/format checks. - Adds a path validity check for
apcBtOpIfcePathinBtrCore_BTGetPropbefore creating the D-Bus method call.
Comments suppressed due to low confidence (1)
src/bt-ifce/btrCore_dbus_bluez5.c:3919
- After adding the path check,
dbus_message_new_method_call(...)is still used without verifying the returnedlpDBusMsgis non-NULL. If the path is invalid (or allocation fails), the subsequentdbus_message_append_argswill dereference NULL and crash. Please add a NULL check here (as is done in other functions in this file) and return an error if message creation fails.
lpDBusMsg = dbus_message_new_method_call(BT_DBUS_BLUEZ_PATH,
apcBtOpIfcePath,
DBUS_INTERFACE_PROPERTIES,
"GetAll");
dbus_message_append_args(lpDBusMsg, DBUS_TYPE_STRING, &pInterface, DBUS_TYPE_INVALID);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/bt-ifce/btrCore_dbus_bluez5.c
Outdated
| if (!btrCore_IsPathValid(apcBtOpIfcePath)) { | ||
| BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n"); | ||
| return -1; | ||
| } |
There was a problem hiding this comment.
The newly added apcBtOpIfcePath validation block uses tab indentation, while the surrounding code uses spaces. Please reformat this block to match the file’s existing indentation to keep diffs consistent and improve readability.
| if (!btrCore_IsPathValid(apcBtOpIfcePath)) { | |
| BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n"); | |
| return -1; | |
| } | |
| if (!btrCore_IsPathValid(apcBtOpIfcePath)) { | |
| BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n"); | |
| return -1; | |
| } |
Reason for change: dbus crash due to invalid path. Test Procedure: Check Ticket description. Risks: Low Priority: P1
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reason for change: dbus crash due to invalid path.
Test Procedure: Check Ticket description.
Risks: Low
Priority: P1